package com.rcc.index.repositoty;

import com.rcc.index.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * Created by rcc on 2017/6/23.
 * User 表接口操作
 */
@Repository
public interface UserRepository extends JpaRepository<User,Long> {
    @Query("select t from User t where t.name = :name")
    User findByUserName(@Param("name") String name);
}
